package cn.iocoder.yudao.module.javainfo.controller.admin.financialflow.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Schema(description = "管理后台 - 资金流水新增/修改 Request VO")
@Data
public class FinancialFlowSaveReqVO {

    @Schema(description = "流水ID（主键）", requiredMode = Schema.RequiredMode.REQUIRED, example = "10902")
    private Long flowId;

    @Schema(description = "用户ID（关联用户表）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1317")
    @NotNull(message = "用户ID（关联用户表）不能为空")
    private Long userId;

    @Schema(description = "宠物ID（关联宠物表，可为空）", example = "39")
    private Long petId;

    @Schema(description = "订单号（业务唯一标识）", requiredMode = Schema.RequiredMode.REQUIRED)
    private String orderNumber;

    @Schema(description = "金额类型（消费/充值）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotEmpty(message = "金额类型（消费/充值）不能为空")
    private String amountType;

    @Schema(description = "交易渠道", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "交易渠道不能为空")
    private String transactionChannel;

    @Schema(description = "金额（单位：分）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "金额（单位：分）不能为空")
    private Long amount;

    @Schema(description = "变动后余额", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long balanceAfter;

    @Schema(description = "折扣率（0-1之间的小数，如0.8表示8折）", example = "0.8")
    private BigDecimal discount;

    @Schema(description = "满赠金额（单位：分）", example = "50")
    private Long bonusAmount;

    @Schema(description = "业务类型（如：PET_FOOD/MEDICAL/SERVICE）", example = "2")
    private String businessType;

    @Schema(description = "关联业务ID（如订单ID、服务ID等）", example = "8387")
    private Long relatedId;

    @Schema(description = "备注信息", example = "随便")
    private String remark;

}